//Json call to get associated fileNames with the given gameId
function getAssociatedFileNames(gameId, comboId){
	$.getJSON(JsonUrls.ASSOCIATED_FILE_NAMES,{"gameId":gameId},
			function (data){
				refillFileNameCombo(data, comboId);
	});
}

//Json call to get the not associated fileNames with the given gameId
function getNonAssociatedFileNames(gameId, comboId){
	$.getJSON(JsonUrls.NON_ASSOCIATED_FILE_NAMES,{"gameId":gameId},
			function (data){
				refillFileNameCombo(data, comboId);
	});
}

function refillFileNameCombo(data, comboId){
	var i;
	$('#'+comboId+' > option').remove();
	$('#'+comboId).append(createOption('-1', 'Select File Name'))
	for(i=0;i<data.length;i++){
		$('#'+comboId).append(createOption(data[i].id, data[i].fileName));
	}
}